solution of recurrence relations using characteristic roots method